package com.guguskins.back.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guguskins.back.entity.GuGoods;
import com.guguskins.back.entity.GuRoll;
import com.guguskins.back.entity.GuRollRecord;
import com.guguskins.back.entity.GuUser;
import com.guguskins.back.entity.bo.RollEditBo;
import com.guguskins.back.entity.vo.PageVo;
import com.guguskins.back.entity.vo.UserVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-06-04
 */
public interface GuRollService extends IService<GuRoll> {

    PageVo<GuRoll> getList(int p, int size, Long userId, int state);

    GuRoll getDetail(Long userId, long rollId);

    PageVo<GuUser> participation(int p, int size, long rollId);

    boolean participate(Long userId, GuRoll roll);

    boolean create(Long userId, GuRoll roll);

    boolean lottery(Long rollId);

    boolean backSave(GuRoll roll);

    boolean backEdit(RollEditBo rollEditBo);

    boolean backDeleteByRollId(long rollId);

    PageVo<GuRoll> backList(int p, int size, String searchKey);
    List<UserVo> backUsersByRollId(long rollId, String searchKey);
    List<GuGoods> backGoodsByRollId(long rollId, String searchKey);

    boolean backPrizeAssign(GuRollRecord rollRecord);

    boolean backCancelPrizeAssign(GuRollRecord rollRecord);
}
